﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Reactive.Disposables;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using ReactiveUI;

namespace ScienceAIApp.Views.AlertView;
/// <summary>
/// Interaction logic for InfoAlertView.xaml
/// </summary>
public partial class InfoAlertView
{
    public InfoAlertView()
    {
        InitializeComponent();
        this.WhenActivated(whenActivated);
    }

    private void whenActivated(CompositeDisposable disposable)
    {
        this.Bind(ViewModel,
                vm => vm.Title,
                v => v.TitleLabel.Content)
            .DisposeWith(disposable);

        this.Bind(ViewModel,
                vm => vm.InfoMessage,
                v => v.InfoMsg.Text)
            .DisposeWith(disposable);

        this.BindCommand(ViewModel, vm => vm.CloseCommand, v => v.CloseBtn).DisposeWith(disposable);
    }
}
